]> git.r.bdr.sh - rbdr/super-polarity/blobdiff - Super Polarity/Actors/StandardShip.cs
Stuffffffff
[rbdr/super-polarity] / Super Polarity / Actors / StandardShip.cs
index 556be0f413b5a96f5a178f37bbf2e1cbb7d9693b..ef2fe7f8116c008c17e4c209d34670373d72f0fd 100644 (file)
@@ -12,9 +12,10 @@ namespace SuperPolarity
     class StandardShip : Ship
     {
 
+        protected bool Flashing;
         protected int ChangeRate;
         protected int CurrentTime;
-        protected int AngleChangeProbability;
+        public int AngleChangeProbability;
         protected int BouncePadding;
         protected float RotationFactor;
         protected Random Random;
@@ -32,13 +33,11 @@ namespace SuperPolarity
             ChangeRate = 50;
             AngleChangeProbability = 50;
             BouncePadding = 0;
-            MaxVelocity = 1;
+            MaxVelocity = 2;
             CurrentTime = 0;
             RotationFactor = (float) (3 * Math.PI / 180);
             Random = new Random(BitConverter.ToInt32(cryptoResult, 0));
             AddingAngle = true;
-
-            HP = 5;
         }
 
         public override void Magnetize(Ship ship, float distance, float angle)
@@ -60,6 +59,16 @@ namespace SuperPolarity
             Position += Velocity;
             UpdateBox();
             Magnetizing = false;
+
+            if (Flashing)
+            {
+                Color = new Color(255, 255, 255, 128);
+                Flashing = false;
+            }
+            else
+            {
+                Color = Color.White;
+            }
         }
 
         protected void AutoMove()
@@ -131,6 +140,7 @@ namespace SuperPolarity
             {
                 var theBullet = (Bullet)other;
                 TakeDamage(theBullet.Power);
+                Flashing = true;
             }
         }